package Items
{
	import EventDispatchers.ImageLoader;
	
	import Events.XMLEvent;
	
	import Graphics.Animation;
	
	import Players.Player;
	
	import Utils.Camera;
	
	import flash.display.BitmapData;
	import flash.geom.Rectangle;
	
	public class Weapon extends Item
	{
		//0 - melee 1-gun 2-projectile
		private var type:Array = new Array(0,1,2);
		private var currentType:int;
		private var damage:int;
		protected var hero:Player;
		
		public function set Type(value:int):void { currentType = value;}
		
		public function Weapon(level:Level)
		{
			super(level);
		}
		
		public override function Draw(camera:Camera, canvas:BitmapData):BitmapData
		{
			this.position.x = this.worldPosition.x - camera.X;
			this.position.y = this.worldPosition.y - camera.Y;
			if(currentAnimation != null && !isPickedup)
			{
				canvas.copyPixels(currentAnimation.Graphic.bitmapData, blitRectangle, position);
			}
			return canvas;
		}
		
		//place all the function you want to happen when the player switches weapons
		public function Switch():void
		{
			
		}
	}
}